package com.jxpanda.infrastructure.crypto.toolkit;

import java.util.Base64;

public class Base64Kit {


    public static byte[] encode(byte[] bytes) {
        return Base64.getEncoder().encode(bytes);
    }

    public static String encodeToString(byte[] bytes) {
        return Base64.getEncoder().encodeToString(bytes);
    }

    public static byte[] decode(byte[] bytes) {
        return Base64.getDecoder().decode(bytes);
    }

    public static byte[] decode(String base64String) {
        return Base64.getDecoder().decode(base64String);
    }


}
